package com.example.librarysystem.Dao;

import com.example.librarysystem.entity.Borrow;
import com.example.librarysystem.entity.Order;
import com.example.librarysystem.entity.OrderInfo;
import org.springframework.stereotype.Component;

import java.sql.Date;
import java.util.List;

@Component("orderDao")
public interface OrderDao {
    Integer selectCount();
    List<OrderInfo> selectOrderInfo(int borrowerId, int currentPage, int pageSize);
    int selectOrderInfoCount(int borrowerId);
    int selectOrderInfoSearchCount(int borrowerId, String bookName, String author, String publishingHouse);
    List<OrderInfo> selectOrderInfoSearch(int borrowerId, String bookName, String author, String publishingHouse, int currentPage, int pageSize);
    void deleteOrderById(int id);
    List<Order> selectByBookName(String bookName);
    List<Order> selectByBookIdAndEndStart(int bookId, Date endDate);
    void insertOrder(Order order);
    List<Order> selectAll(int currentPage, int pageSize);
    Order selectOrderById(int id);
    List<Order> selectByBorrowerId(int borrowerId, Date now);
    List<Order> selectOrderBetween(Date start, Date end);
    List<Order> selectOrderOver(Date end);
}
